var fs = require("fs");
var content = "我是要添加的文字";

fs.promises
  .writeFile("./info.txt", content, {flag:'a'})
  .then((err) => console.log(err));


fs.readFile('./info.txt',{encoding:'utf-8'},(err,data)=>{
    console.log(data);  
})